package com.example.dragandview.diywidget;

import android.app.Activity;
import android.os.Bundle;

import com.example.dragandview.R;

public class DiyViewActivity extends Activity {
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.diywidget_view);
        ItemView tv1 = findViewById(R.id.tv1);
        ItemView tv2 = findViewById(R.id.tv2);
        ItemView tv3 = findViewById(R.id.tv3);
        tv1.setView("姓名", "Toby", true);
        tv2.setView("年龄", null, true);
        tv3.setView("学校", "中国人民大学", false);
    }
}
